<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Insert title here</title>
    <link href="https://assets.gitee.com/assets/favicon-9007bd527d8a7851c8330e783151df58.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
</head>
<body>

<a href="${pageContext.request.contextPath}/user/encryptText/123456">encryptText</a>
<a href="${pageContext.request.contextPath}/test/test">admin</a>
<a href="${pageContext.request.contextPath}/test/index">index</a>

<button onclick="ajaxReq()">ajaxBtn</button>


</body>

<script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>

<script type="text/javascript">
$(function(){
	// alert('jqueryDemo');
	
});
function ajaxReq(){
	
	$.ajax({
		type: "POST",
		url: '${pageContext.request.contextPath}/test/getJson',
		// data: $('#signupForm').serialize(),
		dataType: "json",
		success: function(res){
			console.log("success,res="+res);
			console.log(res);
		},
		error:function(XMLHttpRequest, textStatus, errorThrown){
			console.log("提交ajax函数异常，error:function,XMLHttpRequest="+XMLHttpRequest);
			console.log(XMLHttpRequest);
			console.log("提交ajax函数异常，error:function,textStatus="+textStatus);
			console.log(textStatus);
			console.log("提交ajax函数异常，error:function,errorThrown="+errorThrown);
			console.log(errorThrown);
		}
	});
}
</script>
</html>